// import 'package:flutter_map/flutter_map.dart';
//启示页面
import 'package:flutter/material.dart';
import 'package:test_xzkdemo/utils/common/global.dart';
// import 'package:latlong/latlong.dart';
// import 'package:latlng/latlng.dart';

//列表页面示例
class XinshiMapPage extends StatefulWidget {
//  MyListPage({Key key}) : super(key: key);

  @override
  _XinshiMapPageState createState() => new _XinshiMapPageState();
}

class _XinshiMapPageState extends State<XinshiMapPage>{
 

@override
  void initState() {
    super.initState(); 
  }
  @override
  Widget build(BuildContext context) {
 
    return new Scaffold(
      appBar: AppBar(
        title:Text("地图插件使用"),
      ),
      body: Container(
        //G 是空的，会崩溃
        width: G.screenWidth(context),
        height: G.screenHeight(context),
        // child: buildMap(context),
      ), //内部开始使用基本组件类型
    );
  }


// Widget buildMap(BuildContext context) {
//     return new FlutterMap(
//       options: new MapOptions(
//         center: new LatLng(51.5, -0.09),
//         zoom: 13.0,
//       ),
//       layers: [
//         new TileLayerOptions(
//           urlTemplate: "https://api.tiles.mapbox.com/v4/"
//               "{id}/{z}/{x}/{y}@2x.png?access_token={accessToken}",
//           additionalOptions: {
//             'accessToken': '<PUT_ACCESS_TOKEN_HERE>',
//             'id': 'mapbox.streets',
//           },
//         ),
//         new MarkerLayerOptions(
//           markers: [
//             new Marker(
//               width: 80.0,
//               height: 80.0,
//               point: new LatLng(51.5, -0.09),
//               builder: (ctx) =>
//               new Container(
//                 width: 20,
//                 height: 20,
//                 child: new FlutterLogo(),
//               ),
//             ),
//           ],
//         ),
//       ],
//     );
//   }
}

